package ws.reniec.persona;

public class WSInfoReniecProxy implements ws.reniec.persona.WSInfoReniec {
  private String _endpoint = null;
  private ws.reniec.persona.WSInfoReniec wSInfoReniec = null;
  
  public WSInfoReniecProxy() {
    _initWSInfoReniecProxy();
  }
  
  public WSInfoReniecProxy(String endpoint) {
    _endpoint = endpoint;
    _initWSInfoReniecProxy();
  }
  
  private void _initWSInfoReniecProxy() {
    try {
      wSInfoReniec = (new ws.reniec.persona.WSInfoReniecServiceLocator()).getWSInfoReniec();
      if (wSInfoReniec != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)wSInfoReniec)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)wSInfoReniec)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (wSInfoReniec != null)
      ((javax.xml.rpc.Stub)wSInfoReniec)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public ws.reniec.persona.WSInfoReniec getWSInfoReniec() {
    if (wSInfoReniec == null)
      _initWSInfoReniecProxy();
    return wSInfoReniec;
  }
  
  public java.lang.String buscarUsuarioPorDNI(java.lang.String dn) throws java.rmi.RemoteException{
    if (wSInfoReniec == null)
      _initWSInfoReniecProxy();
    return wSInfoReniec.buscarUsuarioPorDNI(dn);
  }
  
  
}